package com.example.service;

import com.example.Entity.User;
import com.example.Repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    public User getAdmin(User user){
        return userRepository.findUserByUsernameAndPassword(user.getUsername(), user.getPassword());
    }


}
